package com.huitone.gddw.service.dto;

import java.util.Date;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.SvrNodeDef;

/**
 * 业务端定义 DTO 对象
 * @author wuluodan
 *
 */
public class SvrNodeDefDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;

	@ColToProperty
	@TabCol(Index = 2, title = "业务端编码", width = "65")
	private String svrNode;

	@ColToProperty
	@TabCol(Index = 3, title = "业务端名称", width = "90")
    private String svrNodeName;

	@ColToProperty
	@TabCol(Index = 7, title = "最大连接数", width = "65")
    private Integer conNum;

    private String upflag;

    @ColToProperty
	@TabCol(Index = 6, title = "登陆用户名", width = "65")
    private String loginUser;

    private String loginPwd;

    @ColToProperty
	@TabCol(Index = 8, title = "服务IP", width = "75")
    private String serverIp;

    @ColToProperty
	@TabCol(Index = 9, title = "服务端口", width = "")
    private Integer serverPort;

    @ColToProperty
	@TabCol(Index = 10, title = "服务登陆用户名", width = "90")
    private String loginSvrUser;

    @ColToProperty
	@TabCol(Index = 11, title = "服务登陆密码", width = "80")
    private String loginSvrPwd;

    @ColToProperty
	@TabCol(Index = 5, title = "发送端口", width = "")
    private String sendPort;

    @ColToProperty
	@TabCol(Index = 13, title = "业务端说明", width = "150")
    private String desc;

    private String status;
    
    @ColToProperty
	@TabCol(Index = 12, title = "状态", width = "")
    private String statusStr;
    
    private String limittype;	//2：流量，1：流速
    
    @ColToProperty
	@TabCol(Index = 14, title = "分级类型", width = "")
    private String limittypeStr;	
    
    @ColToProperty
   	@TabCol(Index = 15, title = "流量值/【流速值】", width = "")
    private Integer flowspeed;	//流量值、流速值
    
    private String timeunit;	//单位，1：条/时    2：条/分    3：条/秒 	4：条/日/条    5：条/月
    
    @ColToProperty
   	@TabCol(Index = 16, title = "分级单位", width = "")
    private String timeunitStr;	

    private Date insertTime;

    private String insertStaffId;

    private Date lastModTime;

    private String lastModStaffId;

//    private String accessMode;
    
    @ColToProperty
	@TabCol(Index = 4, title = "接入方式", width = "65")
    private String upflagStr;
    
    private Integer maxFlux;
    
    private String acceptReport;
    
    private String acceptMo;
    
    private String smTypecheck;// SMTYPECHECK   是否短信类型检测:0 :是，1否
    
 

	@ColToProperty
	@TabCol(Index = 14, title = "是否白名单", width = "65")
    private String srvtype;	//是否白名单

    public SvrNodeDefDTO() {}
    
    public SvrNodeDefDTO(SvrNodeDef svrNodeDef) {
    	this.setSvrNode(svrNodeDef.getSvrNode());
    	this.setSvrNodeName(svrNodeDef.getSvrNodeName());
    	this.setConNum(svrNodeDef.getConNum());
    	this.setUpflag(svrNodeDef.getUpflag());
    	this.setLoginUser(svrNodeDef.getLoginUser());
    	this.setLoginPwd(svrNodeDef.getLoginPwd());
    	this.setServerIp(svrNodeDef.getServerIp());
    	this.setServerPort(svrNodeDef.getServerPort());
    	this.setLoginSvrUser(svrNodeDef.getLoginSvrUser());
    	this.setLoginSvrPwd(svrNodeDef.getLoginSvrPwd());
    	this.setSendPort(svrNodeDef.getSendPort());
    	this.setDesc(svrNodeDef.getDesc());
    	this.setStatus(svrNodeDef.getStatus());
    	this.setInsertTime(svrNodeDef.getInsertTime());
    	this.setInsertStaffId(svrNodeDef.getInsertStaffId());
    	this.setLastModTime(svrNodeDef.getLastModTime());
    	this.setLastModStaffId(svrNodeDef.getLastModStaffId());
    	this.setUpflag(svrNodeDef.getUpflag());
    	this.setMaxFlux(svrNodeDef.getMaxFlux());
    	this.setAcceptReport(svrNodeDef.getAcceptReport());
    	this.setAcceptMo(svrNodeDef.getAcceptMo());
    	this.setSmTypecheck(svrNodeDef.getSmTypecheck());
    	this.setSrvtype(svrNodeDef.getSrvtype());
    }
    
    public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getSvrNode() {
        return svrNode;
    }

    public void setSvrNode(String svrNode) {
        this.svrNode = svrNode == null ? null : svrNode.trim();
    }

    public String getSvrNodeName() {
        return svrNodeName;
    }

    public void setSvrNodeName(String svrNodeName) {
        this.svrNodeName = svrNodeName == null ? null : svrNodeName.trim();
    }

    public Integer getConNum() {
        return conNum;
    }

    public void setConNum(Integer conNum) {
        this.conNum = conNum;
    }

    public String getUpflag() {
        return upflag;
    }

    public void setUpflag(String upflag) {
        this.upflag = upflag == null ? null : upflag.trim();
    }

    public String getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(String loginUser) {
        this.loginUser = loginUser == null ? null : loginUser.trim();
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd == null ? null : loginPwd.trim();
    }

    public String getServerIp() {
        return serverIp;
    }

    public void setServerIp(String serverIp) {
        this.serverIp = serverIp == null ? null : serverIp.trim();
    }

    public Integer getServerPort() {
        return serverPort;
    }

    public void setServerPort(Integer serverPort) {
        this.serverPort = serverPort;
    }

    public String getLoginSvrUser() {
        return loginSvrUser;
    }

    public void setLoginSvrUser(String loginSvrUser) {
        this.loginSvrUser = loginSvrUser == null ? null : loginSvrUser.trim();
    }

    public String getLoginSvrPwd() {
        return loginSvrPwd;
    }

    public void setLoginSvrPwd(String loginSvrPwd) {
        this.loginSvrPwd = loginSvrPwd == null ? null : loginSvrPwd.trim();
    }

    public String getSendPort() {
        return sendPort;
    }

    public void setSendPort(String sendPort) {
        this.sendPort = sendPort == null ? null : sendPort.trim();
    }
    public String getSmTypecheck() {
 		return smTypecheck;
 	}

 	public void setSmTypecheck(String smTypecheck) {
 		this.smTypecheck = smTypecheck;
 	}

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc == null ? null : desc.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getStatusStr() {
    	if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}
	
	public String getLimittype() {
		return limittype;
	}

	public void setLimittype(String limittype) {
		this.limittype = limittype;
	}

	public Integer getFlowspeed() {
		return flowspeed;
	}

	public void setFlowspeed(Integer flowspeed) {
		this.flowspeed = flowspeed;
	}

	public String getTimeunit() {
		return timeunit;
	}

	public void setTimeunit(String timeunit) {
		this.timeunit = timeunit;
	}
	
	public String getLimittypeStr() {
		if (null==this.limittype) {
			return "";
		}
		if (this.limittype.equals("1")) {
			return "流速";
		}
		if (this.limittype.equals("2")) {
			return "流量";
		}
		return "";
	}

	public void setLimittypeStr(String limittypeStr) {
		this.limittypeStr = limittypeStr;
	}

	public String getTimeunitStr() {
		if (null==this.timeunit) {
			return "";
		}
		if (this.timeunit.equals("1")) {
			return "条/时";
		}
		if (this.timeunit.equals("2")) {
			return "条/分";
		}
		if (this.timeunit.equals("3")) {
			return "条/秒";
		}
		if (this.timeunit.equals("4")) {
			return "条/日";
		}
		if (this.timeunit.equals("5")) {
			return "条/月";
		}
		return "";
	}

	public void setTimeunitStr(String timeunitStr) {
		this.timeunitStr = timeunitStr;
	}

	public Date getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    public String getInsertStaffId() {
        return insertStaffId;
    }

    public void setInsertStaffId(String insertStaffId) {
        this.insertStaffId = insertStaffId == null ? null : insertStaffId.trim();
    }

    public Date getLastModTime() {
        return lastModTime;
    }

    public void setLastModTime(Date lastModTime) {
        this.lastModTime = lastModTime;
    }

    public String getLastModStaffId() {
        return lastModStaffId;
    }

    public void setLastModStaffId(String lastModStaffId) {
        this.lastModStaffId = lastModStaffId == null ? null : lastModStaffId.trim();
    }

//    public String getAccessMode() {
//        return accessMode;
//    }
//
//    public void setAccessMode(String accessMode) {
//        this.accessMode = accessMode == null ? null : accessMode.trim();
//    }

	public String getUpflagStr() {
		if (null == this.upflag)
			return "未知";
		if (this.upflag.equals("1"))
			return "沿用旧平台";
		if (this.upflag.equals("2"))
			return "使用新平台";
		return "未知";
	}

	public void setUpflagStr(String upflagStr) {
		this.upflagStr = upflagStr;
	}

	public Integer getMaxFlux() {
		return maxFlux;
	}

	public void setMaxFlux(Integer maxFlux) {
		this.maxFlux = maxFlux;
	}

	public String getAcceptReport() {
		return acceptReport;
	}

	public void setAcceptReport(String acceptReport) {
		this.acceptReport = acceptReport;
	}

	public String getAcceptMo() {
		return acceptMo;
	}

	public void setAcceptMo(String acceptMo) {
		this.acceptMo = acceptMo;
	}

	public String getSrvtype() {
		if (null==this.srvtype) {
			return "是";
		}
		if (this.srvtype.equals("0")) {
			return "否";
		}
		if (this.srvtype.equals("1")) {
			return "是";
		}
		return "是";
	}

	public void setSrvtype(String srvtype) {
		this.srvtype = srvtype;
	}
	
}
